package login

import (
	"config"
	"github.com/name5566/leaf/module"
	"github.com/name5566/leaf/chanrpc"
)

var (
	skeleton = NewSkeleton()
	RPC = skeleton.ChanRPCServer
	Instance = new(Module)
)

func NewSkeleton() *module.Skeleton {
	skeleton := &module.Skeleton{
		GoLen:              config.GO_LEN,
		TimerDispatcherLen: config.TIMER_DISPATCHER_LEN,
		ChanRPCServer:      chanrpc.NewServer(config.CHAN_RPC_LEN),
	}
	skeleton.Init()
	return skeleton
}

type Module struct {
	*module.Skeleton
}

func (m *Module) OnInit() {
	m.Skeleton = skeleton
}

func (m *Module) OnDestroy() {

}

